package com.cevent.community.app.common.dto;/**
 * Created by Cevent on 2021/9/14.
 */

/**
 * @author cevent
 * @description 统一响应参数配置
 * @date 2021/9/14 15:43
 */
public class ResponseDataDto<T> {
    //1.执行成功/失败返回,默认成功
    private boolean success=true;
    //2.返回码
    private String responseCode;
    //3.返回信息
    private String responseMsg;
    //4.返回泛型数据
    private T responseData;

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(String responseCode) {
        this.responseCode = responseCode;
    }

    public String getResponseMsg() {
        return responseMsg;
    }

    public void setResponseMsg(String responseMsg) {
        this.responseMsg = responseMsg;
    }

    public T getResponseData() {
        return responseData;
    }

    public void setResponseData(T responseData) {
        this.responseData = responseData;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("ResponseDataDto{");
        sb.append("success=").append(success);
        sb.append(", responseCode='").append(responseCode).append('\'');
        sb.append(", responseMsg='").append(responseMsg).append('\'');
        sb.append(", responseData=").append(responseData);
        sb.append('}');
        return sb.toString();
    }
}
